

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit User</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${resource(dir:'')}">Home</a></span>
        </div>
        <div class="body">
            <g:hasErrors bean="${registerCommand}">
              <div class="errors">
                  <g:renderErrors bean="${registerCommand}" as="list" />
              </div>
            </g:hasErrors>
            <g:form class="container" name="myform" method="post">
              <div class="center">
                    <table>
                        <tbody>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">${message(code:'label.my_gender')}</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:registerCommand,field:'gender','errors')}">
                                    <input type="text" id="gender" name="gender" value="${fieldValue(bean:registerCommand,field:'gender')}"/>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">${message(code:'label.i_have_a_book')}</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:registerCommand,field:'ownedBook','errors')}">
                                    <input type="text" readonly="readonly" id="ownedBook" name="ownedBook" value="${fieldValue(bean:registerCommand,field:'ownedBook')}"/>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">${message(code:'label.find_who_is_interested')}</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:registerCommand,field:'friendGender','errors')}">
                                    <input type="text" id="friendGender" name="friendGender" value="${fieldValue(bean:registerCommand,field:'friendGender')}"/>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">${message(code:'label.i_want_to_borrow')}</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:registerCommand,field:'wantedBook','errors')}">
                                    <input type="text" readonly="readonly" id="wantedBook" name="wantedBook" value="${fieldValue(bean:registerCommand,field:'wantedBook')}"/>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">${message(code:'label.i_am_at')}</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:registerCommand,field:'city','errors')}">
                                    <g:select optionKey="id" from="${City.list()}" name="city" value="${registerCommand?.city}" ></g:select>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">${message(code:'label.my_mail')}</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:registerCommand,field:'email','errors')}">
                                    <input type="text" id="email" name="email" value="${fieldValue(bean:registerCommand,field:'email')}"/>
                                </td>
                            </tr>
                        </tbody>
                    </table>
              </div>
              <div class="buttons">
                  <span class="button"><g:actionSubmit action="register" value="${message(code:'label.register')}" /></span>
              </div>
           </g:form>
        </div>
    </body>
</html>
